package com.hileto.inf.utils.dao;

import java.util.HashMap;
import java.util.Map;

/**
 * Copyright: Copyright (c) 2012
 *     深圳市海乐淘电子商务有限公司
 * @Author : 曾林宝
 * @CreateTime : 2013-1-21 上午09:56:55
 *
 * @Description: sql管理工厂
 */
public class EntityFactory {

	private final static Map<Class<?>,Entity> entityMap = new HashMap<Class<?>, Entity>();
	@SuppressWarnings("all")
	public final static synchronized<T> Entity parseEntity(Class<T> clazz){
		Entity entity = null;
		entity = entityMap.get(clazz);
		if(null == entity){
			entity = new Entity(clazz);
			entityMap.put(clazz, entity);
		}
		return entity;
	}
	
}
